<?php
    $checkShow      = false;
    if ( $this->arrArticle['total']>0 && !empty($this->arrArticle['list']) && is_array($this->arrArticle['list']) )
    {
        $checkShow      = true;
    }//end if
?>
<div id="wrapper_container">
    <!-- InstanceBeginEditable name="Hot news option" -->
    <div class="banner_960 w960 mar_left_10"></div>
    <!-- InstanceEndEditable -->
    <div class="w980 left">
        <div id="col_left" class="w650 left pad_left_10">
            <!-- InstanceBeginEditable name="Content col left" -->
            <div class="box_content_left" id="baithi_moinhat">
                <div class="title bg_baithi">
                    <h2>Bài thi của bạn</h2>
                <?php if ( $checkShow ) {?>
                    <span>Hiển thị từ <?php echo $this->start;?> đến <?php echo $this->end;?> trong số <?php echo $this->arrArticle['total'];?> bài</span>
                <?php } else {?>
                    <span>Bạn chưa có bài dự thi</span>
                <?php }//end if?>
                </div>
                <div class="content bg_den no_bor_bot">
                    <p class="caution">Bạn có thể gửi nhiều bài dự thi và cùng lúc giành nhiều giải thưởng của chương trình.</p>
                </div>
            </div>

        <?php if ( $checkShow ) {?>
            <div id="list_baithi">
                <div class="content">
                    <ul>
                    <?php foreach ( $this->arrArticle['list'] as $key=>$row ) {?>
                        <li>
                        <?php if ( !empty($row['image']) ) {?>
                            <a href="<?php echo $this->MakeUrlSite(1, array('title'=>$row['title'], 'id'=>$row['articleid']));?>" title="<?php echo $this->escape($row['title']);?>"><img src="<?php echo UPLOAD_URL_CLUB.$row['image'];?>" align="absmiddle" width="100" height="77" title="<?php echo $this->escape($row['title']);?>" /></a>
                        <?php }//end if?>
                            <div class="info">
                                <p><a class="title" href="<?php echo $this->MakeUrlSite(1, array('title'=>$row['title'], 'id'=>$row['articleid']));?>" title="<?php echo $this->escape($row['title']);?>"><?php echo $this->escape($row['title']);?></a></p>
                                <p><?php echo $this->DateTimeDiff($row['creation_time']);?></p>
                                <div class="xem_chon">
                                    <p><label><?php echo $row['total_view'];?></label> lượt xem <ins>|</ins> <label><?php echo $row['total_vote'];?></label> bình chọn</p>
                                </div>
                            </div>
                        </li>
                    <?php }//end if?>
                    </ul>
                </div>
                <?php if ( !empty($this->pagingHTML) ) {?>
                <div class="paging">
                    <?php echo $this->pagingHTML;?>
                </div>
            <?php }//end if?>
            </div>
        <?php }//end if?>
            <!-- InstanceEndEditable -->
        </div>
        
        <div id="col_right" class="w300 right pad_right_10">
            <!-- InstanceBeginEditable name="Content col Right" -->
        <?php if ( $this->scheduleOpen ) {?>
            <div class="banner_300 pad_top_10">
                <a href="<?php echo $this->MakeUrlSite(7, null);?>"><img src="<?php echo IMAGE_URL_CLUB;?>/graphics/banner_2.jpg" align="absmiddle" /></a>
            </div>
        <?php }//end if?>
            <?php echo $this->render('box/detail_right.phtml');?>
            <!-- InstanceEndEditable -->
        </div>
    </div>
</div>